#pragma once
#include "audionode.h"
#include "SineWave.h"
#include "FreqADSR.h"

class CDrumSynth :
	public CAudioNode
{
public:
	CDrumSynth(void);
	~CDrumSynth(void);

	virtual void Start( void );
	virtual bool Generate( void );

	double GetRandomNum();
	void SetPitch( double aFreq ) { mSineWave.SetFreq(aFreq); }
	void SetDuration( double aD ) { mFreqADSR.SetDuration(aD); }

private:
	CSineWave mSineWave;

	double mStartFreq;
	double mEndFreq;

	CFreqADSR mFreqADSR;
};

